Templates


Using The Templates

The template feature of AutoRank Pro makes the script extremely easy to integrate into your site. These files are very easy to edit, but you need to follow a few guidelines. You should be able to edit all of the .htmlt files in any html editor and be ok. All of the .etmpl files need to be edited in an ASCII text editor such as Notepad in Windows or Pico in Unix.

The template in admin.cgi

In admin.cgi when you choose to edit the HTML for one of your main pages, you will be presented with a page that has text boxes for the header, template, and footer. In this file we will discuss the template, header, and footer portions of that page. This template works the same way as all the others; the only difference is that you will be entering the HTML you create into a web-based form instead of editing a template file. If you do not enter a template the default template will be used.

When you edit the template, you will only enter the HTML for a single rank. The script will then use that HTML for each of the rankings on the page. If you find yourself inserting #%RANK%#, #%DESC%#, or any of those values in #%%# more than once in the template, then you are most likely doing something wrong.

A different template can be used for each of your pages, so don't feel like you have to stick with the same look throughout your top list. If you have any questions, see the tech support info at the bottom of this file.

The .htmlt Files

These files are used to generate the HTML that the scripts output. Of the .htmlt files, there are only certain ones you should edit. Never, ever, edit any .htmlt file that begins with _admin. Those are used for the administrative script, and only you the administrator will see them. Any editing to those files will result in loss of tech support from CGI Works.

In each of the files you will find standard HTML and pieces of text surrounded by #%%#. Anything surrounded by #%%# should not be edited. These are items that will be inserted by the script. You can move it around all you want, but do not change the value inside the #%%#.

Basically you can use any HTML you want. You should first use the script with the default templates so you can get a feel of what each #%%# item is replaced with. Once you have a feel for how they are working, you can go in and put your HTML in. If you have any questions, see the tech support info at the bottom of this file.

The .etmpl Files

These files are used as templates for the e-mails that are sent when a member signs up, or when a member needs reminded of their password. They follow a certain format which needs to be maintained in order for the e-mails to be sent. That order is:

To: user@domain.com
From: your-email@domain.com
Subject: The subject

The body of the message

Note that there must be a blank line between the Subject line and the body of the message. Failure to leave that blank line will result in e-mails not being sent.

The same format is used in the .etmpl files as is used in the .htmlt files. All items that the script will insert are surrounded by #%%#. Again, do not edit these. You can move them around all you want within the e-mail. Make sure you edit these files in an ASCII text editor such as Notepad. If you have any questions, see the tech support info at the bottom of this file.

After editing the templates

After you have edited the templates to your liking, simply upload them in ASCII mode to the templates directory you created. If your FTP client asks you if you want to replace the current version, select yes. You can verify that the new versions have been uploaded properly by pointing your browser to accounts.cgi to see if your HTML appears.


Descriptions Of Each Template

  • "Edit HTML For [page]" template in admin.cgi

    This is the HTML that will be used for the selected page.

    Header HTML and Footer HTML Options

    These values are only recognized in the header or footer HTML

    #%UPDATE%# - The last updated time
    #%NEXTUP%# - The time the next rerank will occur*
    #%TOTAL%# - Total members in the database
    #%TITLE%# - Title for the site of the moment
    #%DESC%# - Description for the site of the moment
    #%BANNER%# - Banner for the site of the moment
    #%URL%# - Outgoing URL for the site of the moment
    #%ICONS%# - Icons for the site of the moment

    * Only works if you have filled in a value for Re-rank time in setup.cgi. If you are using cron, you can still set this value to the amount of time that will pass between cron updates.

    Template HTML Options

    These values are only recognized in the template HTML.

    #%RANK%# - The site's current rank
    #%FONT_SIZE%# - The font size to use, from setup.cgi
    #%BANNER%# - The site's banner
    #%TITLE%# - The site's title
    #%IN%# - The number of hits sent BY the site
    #%OUT%# - The number of hits sent TO the site
    #%DESC%# - The description of the site
    #%NEW%# - This will place a new icon next to the site if it is a new account
    #%URL%# - This is the outgoing URL for the account
    #%PREVRANK%# - This is the site's rank when the list was last reset
    #%PREVIN%# - This is the # of hits the site had sent when the list was last reset
    #%CAT%# - This is the site's category
    #%ICONS%# - This will display any icons that heve been selected for the site

  • search.cgi template

    This is the page surfers will see when they do a search.

    #%NEW%# - The new icon, if applicable
    #%URL%# - The outgoing URL to the site
    #%IN%# - Number of hits sent in by the site
    #%OUT%# - Hits sent out to the site
    #%DESC%# - The site's description
    #%CAT%# - The site's category
    #%TITLE%# - The site's title
    #%ICONS%# - Any icons associated with this account

    Footer Values

    These values may be placed only in the footer.

    #%TOTAL%# - The number of matches found
    #%SEARCH%# - The keyword that was searched for

  • index.cgi template

    This is the page surfers will see for the quick list.

    #%TITLE%# - The site's title
    #%URL%# - The outgoing URL to the site

  • _account_add.htmlt

    This is the page webmasters will see when adding their account.

    #%EM_FIELD%# - The form field where members enter their e-mail address
    #%ST_FIELD%# - The form field where members enter their site's title
    #%SU_FIELD%# - The form field where members enter their site's url
    #%SD_FIELD%# - The form field where members enter their site's description
    #%BU_FIELD%# - The form field where members enter their default banner URL
    #%CT_FIELD%# - The form field where members select their site's category
    #%UN_FIELD%# - The form field where members enter their desired username
    #%PW_FIELD%# - The form field where members enter their desired password
    #%VP_FIELD%# - The form field where members verify their desired password
    #%SUBMIT%# - The button the webmaster will press to add their account

  • _account_added.htmlt

    This is the page webmasters will see after adding their account.

    #%LOGIN_URL%# - The URL to the account maintenance login page (accounts.cgi?login)
    #%TRACK_URL%# - The URL the member should send hits to
    #%E-MAIL%# - The webmaster's e-mail address
    #%SITE_TITLE%# - The webmaster's site title
    #%SITE_URL%# - The webmaster's site URL
    #%SITE_DESC%# - The webmaster's site description
    #%BANNER_URL%# - The webmaster's banner URL
    #%USERNAME%# - The webmaster's username
    #%PASSWORD%# - The webmaster's password

  • _account_edit.htmlt

    This is the page webmasters will see when editing their account.

    #%EM_FIELD%# - The form field where members enter their e-mail address
    #%ST_FIELD%# - The form field where members enter their site's title
    #%SU_FIELD%# - The form field where members enter their site's url
    #%SD_FIELD%# - The form field where members enter their site's description
    #%BU_FIELD%# - The form field where members enter their default banner URL
    #%CT_FIELD%# - The form field where members select their site's category
    #%PW_FIELD%# - The form field where members enter their desired password
    #%SUBMIT%# - The button the webmaster will press to add their account

  • _account_farm.htmlt

    This page will be your banner farm - members will get links to your site here.

    #%URL%# - The URL the member should link to

  • _account_login.htmlt

    This is the page webmasters will see when logging into their account.

    #%USERNAME_FIELD%# - The form field where members enter their username
    #%EDIT_RADIO%# - The radio button to select to edit account
    #%STATS_RADIO%# - The radio button to select to view stats
    #%LINK_RADIO%# - The radio button to select to view the banner farm
    #%PASSWORD_FIELD%# - The form field where members enter their password
    #%SUBMIT_BUTTON%# - The button the webmaster will press to login to their account

  • _account_remind.htmlt

    This is the page webmasters will see if they need their password sent.

    #%EMAIL_FIELD%# - The field to enter an e-mail address
    #%SUBMIT_BUTTON%# - The submit button

  • _account_reminded.htmlt

    This is the page webmasters will see when their password is sent.

    #%EMAIL%# - The e-mail address that login information was sent to.

  • _account_stats.htmlt

    This is the page webmasters will see that displays their stats.

    #%HITS_IN%# - Hits in since the last reset
    #%HITS_OUT%# - Hits out since the last reset
    #%PREVRANK%# - Site's rank when the list was last reset
    #%PREVIN%# - Hits the account had sent when last reset
    #%STATS%# - An overview of previous stats

  • _account_updated.htmlt

    This is the page webmasters will see after they edit their account

    No Script Variables

  • _error_data.htmlt

    This is the page surfers/webmasters will see if there is a data error.

    #%HTML_TITLE%# - The HTML page title
    #%SHORT_ERROR_DESC%# - A short error message
    #%LONG_ERROR_DESC%# - A long descriptive error message
    #%SITE_ADMIN%# - A string containing list administrator's e-mail address

  • _email_added.etmpl

    The e-mail sent when a webmaster signs up for an account.

    #%EMAIL%# - The e-mail address of the webmaster signing up
    #%FROM%# - Your e-mail address
    #%SEND_URL%# - The URL the member should send hits to
    #%LOGIN_URL%# - The URL to accounts.cgi?login
    #%USER%# - The username the member selected
    #%PASS%# - The password the member selected
    #%MAIN_PAGE%# - The URL to the main page of your pic post

    Remember to leave a blank line between the subject line and the message body!

  • _email_reject.etmpl

    The e-mail sent when an account is rejected for addition to your list.
    Only used if you are reviewing new additions!

    #%EMAIL%# - The webmaster's email address
    #%FROM%# - Your email address
    #%TITLE%# - The title of the rejected site
    #%DESC%# - The description of the rejected site
    #%URL%# - The URL of the rejected site
    #%ACCTS_URL%# - The URL to accounts.cgi
    #%MAIN_PAGE%# - The URL to your main ranking page

    Remember to leave a blank line between the subject line and the message body!

  • _email_remind.etmpl

    The e-mail sent when a webmaster needs their login information sent.

    #%EMAIL%# - The webmaster's email address
    #%FROM%# - Your email address
    #%USER%# - The webmaster's username
    #%PASS%# - The webmaster's password
    #%EDIT%# - The URL to accounts.cgi?login
    #%LINK%# - The URL the member should send hits to

    Remember to leave a blank line between the subject line and the message body!


Technical Support